import request from '@/utils/request'
const module = '/admin/base/productUnit'

export const GetUnitList = (pageNum, pageSize) => {
  return request.get(`${module}/unitList/${pageNum}/${pageSize}`)
}

export const GetUnitById = id => {
  return request.get(`${module}/getUnitById/${id}`)
}
export const DeleteUnit = id => {
  return request.delete(`${module}/deletedUnit/${id}`)
}
export const UpdateUnit = data => {
  return request.put(`${module}/updateUnit`, data)
}

export const SaveUnit = data => {
  return request.post(`${module}/saveUnit`, data)
}

export const FindAllProductUnit = () => {
  return request.get(`${module}/allProductUnit`)
}
